package com.asset.dispoal.file.appoint;

import com.asset.dispoal.file.appoint.api.FileAppointService;
import com.asset.dispoal.file.appoint.dto.AppointImportRequest;
import com.asset.dispoal.file.appoint.dto.AppointWithdrawalRequest;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import tech.mhuang.pacebox.springboot.protocol.Result;

@RestController
@Api(value = "委派接口", tags = "委派接口")
@RequestMapping("file/appoint")
public class FileAppointController {

    @Autowired
    FileAppointService fileAppointService;

    @PostMapping("/importAppoint")
    @ApiOperation(value = "导入派案", notes = "导入派案")
    public Result importAppoint(AppointImportRequest request) {
        return fileAppointService.importAppoint(request);
    }

    @PostMapping("withdrawal")
    @ApiOperation(value = "退案", notes = "退案")
    public Result withdrawal(AppointWithdrawalRequest request) {
        return fileAppointService.withdrawl(request);
    }
}
